<div>
  <h2>
    栏目
    <small ng-if="id">修改</small>
    <small ng-if="!id">添加</small>
  </h2>
</div>
<form class="form-horizontal" name="form" role="form" ng-submit="set()">
  <div class="form-group">
    <label for="code" class="col-sm-1 control-label">编号</label>
    <div class="col-sm-5">
      <input type="text" class="form-control" id="code" placeholder="请输入编号" required="required" ng-model="vm.category.code">
    </div>
  </div>
  <div class="form-group">
    <label for="name" class="col-sm-1 control-label">名称</label>
    <div class="col-sm-5">
      <input type="text" class="form-control" id="name" placeholder="请输入名称" required="required" ng-model="vm.category.name">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-1 col-sm-3">
      <button type="submit" class="btn btn-success" ng-class="">确定</button>
      <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
    </div>
  </div>  
</form>
